package com.ship.common.core.exception;


import com.ship.common.core.web.domain.ResultCode;

/**
 * @author tangshixuan
 * @date 2023-8-30
 */
public final class BusException extends BaseException{

    private static final long serialVersionUID = 1L;

    private final ResultCode errorCode;

    public BusException(ResultCode errorCode) {
        super("");
        this.errorCode = errorCode;

    }

    public BusException(String message, ResultCode errorCode) {
        super(message);
        this.errorCode = errorCode;
    }

    public BusException(String message, Throwable cause, ResultCode errorCode) {
        super(message, cause);
        this.errorCode = errorCode;
    }

    public BusException(Throwable cause, ResultCode errorCode) {
        super("",cause);
        this.errorCode = errorCode;
    }


    public ResultCode getErrorCode() {
        return errorCode;
    }
}
